class ProductModel {
  String productId;
  String originalPrice;
  String finalPrice;
  String shopName;
  List<String> headImgs;
  String pic;
  String title;
  String type;
  String returnPrice;
  String couponEndTime;
  String sale;
  String partnerPrice;
  String sellerId;
  List<String> thums;
  String couponStartTime;
  String couponPrice;
  double commission;
  String shopType;
  String desc;

  ProductModel(
      {this.productId,
        this.originalPrice,
        this.finalPrice,
        this.shopName,
        this.headImgs,
        this.pic,
        this.title,
        this.type,
        this.returnPrice,
        this.couponEndTime,
        this.sale,
        this.partnerPrice,
        this.sellerId,
        this.thums,
        this.couponStartTime,
        this.couponPrice,
        this.commission,
        this.shopType,
        this.desc});

  ProductModel.fromJson(Map<String, dynamic> json) {
    productId = json['productId'];
    originalPrice = json['originalPrice'];
    finalPrice = json['finalPrice'];
    shopName = json['shopName'];
    headImgs = json['headImgs']!=null?json['headImgs'].cast<String>():[];
    pic = json['pic'];
    title = json['title'];
    type = json['type'];
    returnPrice = json['returnPrice'];
    couponEndTime = json['couponEndTime'];
    sale = json['sale'];
    partnerPrice = json['partnerPrice'];
    sellerId = json['sellerId'];
    thums = json['thums'].cast<String>();
    couponStartTime = json['couponStartTime'];
    couponPrice = json['couponPrice'];
    commission = json['commission'];
    shopType = json['shopType'];
    desc = json['desc'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['productId'] = this.productId;
    data['originalPrice'] = this.originalPrice;
    data['finalPrice'] = this.finalPrice;
    data['shopName'] = this.shopName;
    data['headImgs'] = this.headImgs;
    data['pic'] = this.pic;
    data['title'] = this.title;
    data['type'] = this.type;
    data['returnPrice'] = this.returnPrice;
    data['couponEndTime'] = this.couponEndTime;
    data['sale'] = this.sale;
    data['partnerPrice'] = this.partnerPrice;
    data['sellerId'] = this.sellerId;
    data['thums'] = this.thums;
    data['couponStartTime'] = this.couponStartTime;
    data['couponPrice'] = this.couponPrice;
    data['commission'] = this.commission;
    data['shopType'] = this.shopType;
    data['desc'] = this.desc;
    return data;
  }
}